/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.acme.persistence;

import com.acme.model.Stock;
import com.acme.model.StockPrice;
import java.util.List;
import org.hibernate.Session;
import org.hibernate.SessionFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

/**
 *
 * @author General
 */
@Repository
public class StockPriceDaoImpl extends AbstractHbmDao<StockPrice, Long>  implements StockPriceDao {

    @Autowired
    public StockPriceDaoImpl(SessionFactory sf) {
            super(sf);
    }
    
    @Override
    protected String getEntityName() {
        return "com.acme.model.StockPrice";
    }

    @Override
    protected String getIdName() {
        return "stock_id";
    }
    
    /* 
    public List<StockPrice> findById(long stock_id) {
        Session s = sf.getCurrentSession();		
        return s.createQuery("from StockPrice where stock_id = " + stock_id).list();
    }*/
    
}
